package com.example.sharding.demo.model.table;

import lombok.Data;

import javax.persistence.*;
import java.util.Date;

@Data
@Table(name = "t_user")
public class User {

    public User() {
    }

    public User(Integer id) {
        this.id = id;
    }

    public User(String name) {
        this.name = name;
    }

    public User(Integer id, String userId, String name, String password, Integer gender, Date createTime) {
        this.id = id;
        this.userId = userId;
        this.name = name;
        this.password = password;
        this.gender = gender;
        this.createTime = createTime;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @Column(name = "user_id")
    private String userId;

    private String name;

    private String password;

    private Integer gender;

    @Column(name = "create_time")
    private Date createTime;



}